package com.syedu.day12.homework;

import org.apache.commons.lang3.StringUtils;

/**
 * description：反转一句英文语句中所有单词的顺序
 * @author Administrator
 * @date 2022/3/25 11:03
 */
public class Exercise2 {
    public static void main(String[] args) {
        String content = "There are moments in life when you miss someone so much that you just want " +
                "to pick them from your dreams and hug them for real!";
        String[] strings = content.split(" ");
        StringBuilder stringBuilder = new StringBuilder();
        for(String str : strings){
            stringBuilder.append(StringUtils.reverse(str) + " ");
        }
        System.out.println(stringBuilder);
    }
}